<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::IOThreadStorage&lt; C &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1IOThreadStorage.html">IOThreadStorage</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classdrogon_1_1IOThreadStorage-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::IOThreadStorage&lt; C &gt; 模板类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>Utility class for thread storage handling  
 <a href="classdrogon_1_1IOThreadStorage.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="IOThreadStorage_8h_source.html">IOThreadStorage.h</a>&gt;</code></p>
<div class="dynheader">
类 drogon::IOThreadStorage&lt; C &gt; 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1IOThreadStorage__inherit__graph.png" border="0" usemap="#adrogon_1_1IOThreadStorage_3_01C_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="adrogon_1_1IOThreadStorage_3_01C_01_4_inherit__map" id="adrogon_1_1IOThreadStorage_3_01C_01_4_inherit__map">
<area shape="rect" title="Utility class for thread storage handling" alt="" coords="5,79,228,104"/>
<area shape="rect" title=" " alt="" coords="36,5,197,31"/>
<area shape="poly" title=" " alt="" coords="119,44,119,79,114,79,114,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<div class="dynheader">
drogon::IOThreadStorage&lt; C &gt; 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1IOThreadStorage__coll__graph.png" border="0" usemap="#adrogon_1_1IOThreadStorage_3_01C_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="adrogon_1_1IOThreadStorage_3_01C_01_4_coll__map" id="adrogon_1_1IOThreadStorage_3_01C_01_4_coll__map">
<area shape="rect" title="Utility class for thread storage handling" alt="" coords="5,79,228,104"/>
<area shape="rect" title=" " alt="" coords="36,5,197,31"/>
<area shape="poly" title=" " alt="" coords="119,44,119,79,114,79,114,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a99ea4e2087640afb5489cffb283486a2" id="r_a99ea4e2087640afb5489cffb283486a2"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> = C</td></tr>
<tr class="separator:a99ea4e2087640afb5489cffb283486a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d9827ce9a95c8eedcb06ce760541d48" id="r_a7d9827ce9a95c8eedcb06ce760541d48"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a7d9827ce9a95c8eedcb06ce760541d48">InitCallback</a> = std::function&lt; void(<a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;, size_t)&gt;</td></tr>
<tr class="separator:a7d9827ce9a95c8eedcb06ce760541d48"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a744b426884cbb4c04c12f52aa48f3bbc" id="r_a744b426884cbb4c04c12f52aa48f3bbc"><td class="memTemplParams" colspan="2">template&lt;typename... Args&gt; </td></tr>
<tr class="memitem:a744b426884cbb4c04c12f52aa48f3bbc"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a744b426884cbb4c04c12f52aa48f3bbc">IOThreadStorage</a> (Args &amp;&amp;...args)</td></tr>
<tr class="separator:a744b426884cbb4c04c12f52aa48f3bbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacd3dcefacbd09c3309d42f2f166e579" id="r_aacd3dcefacbd09c3309d42f2f166e579"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#aacd3dcefacbd09c3309d42f2f166e579">init</a> (const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a7d9827ce9a95c8eedcb06ce760541d48">InitCallback</a> &amp;initCB)</td></tr>
<tr class="separator:aacd3dcefacbd09c3309d42f2f166e579"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65cc6d82047caf8e3e5b9aed0f79ca16" id="r_a65cc6d82047caf8e3e5b9aed0f79ca16"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a65cc6d82047caf8e3e5b9aed0f79ca16">getThreadData</a> ()</td></tr>
<tr class="memdesc:a65cc6d82047caf8e3e5b9aed0f79ca16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the thread storage associate with the current thread  <br /></td></tr>
<tr class="separator:a65cc6d82047caf8e3e5b9aed0f79ca16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a387588390a81f201731f3d989e8378d4" id="r_a387588390a81f201731f3d989e8378d4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a387588390a81f201731f3d989e8378d4">getThreadData</a> () const</td></tr>
<tr class="separator:a387588390a81f201731f3d989e8378d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31516d59aed4d5352a01877c2bd82361" id="r_a31516d59aed4d5352a01877c2bd82361"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a31516d59aed4d5352a01877c2bd82361">setThreadData</a> (const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;newData)</td></tr>
<tr class="memdesc:a31516d59aed4d5352a01877c2bd82361"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the thread data for the current thread  <br /></td></tr>
<tr class="separator:a31516d59aed4d5352a01877c2bd82361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcf2d6a7d36c8d985ba57adc318f52a2" id="r_afcf2d6a7d36c8d985ba57adc318f52a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#afcf2d6a7d36c8d985ba57adc318f52a2">setThreadData</a> (<a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&amp;newData)</td></tr>
<tr class="separator:afcf2d6a7d36c8d985ba57adc318f52a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b65b8081973a7b15d824abcf0df8591" id="r_a2b65b8081973a7b15d824abcf0df8591"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a2b65b8081973a7b15d824abcf0df8591">operator-&gt;</a> ()</td></tr>
<tr class="separator:a2b65b8081973a7b15d824abcf0df8591"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bd1c4f7eeadb199d4a1e6c1d164b6cd" id="r_a8bd1c4f7eeadb199d4a1e6c1d164b6cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a8bd1c4f7eeadb199d4a1e6c1d164b6cd">operator*</a> ()</td></tr>
<tr class="separator:a8bd1c4f7eeadb199d4a1e6c1d164b6cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04a8083b0833c03fb2f5522736876325" id="r_a04a8083b0833c03fb2f5522736876325"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a04a8083b0833c03fb2f5522736876325">operator-&gt;</a> () const</td></tr>
<tr class="separator:a04a8083b0833c03fb2f5522736876325"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18a10e8496d63e13dedfd41044c5f921" id="r_a18a10e8496d63e13dedfd41044c5f921"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a18a10e8496d63e13dedfd41044c5f921">operator*</a> () const</td></tr>
<tr class="separator:a18a10e8496d63e13dedfd41044c5f921"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename C&gt;<br />
class drogon::IOThreadStorage&lt; C &gt;</div><p>Utility class for thread storage handling </p>
<p>Thread storage allows the efficient handling of reusable data without thread synchronisation. For instance, such a thread storage would be useful to store database connections.</p>
<p>Example usage:</p>
<div class="fragment"><div class="line"><span class="keyword">struct </span>MyThreadData {</div>
<div class="line">    <span class="keywordtype">int</span> threadLocal = 42;</div>
<div class="line">    std::string something = <span class="stringliteral">&quot;foo&quot;</span>;</div>
<div class="line">};</div>
<div class="line"> </div>
<div class="line"><span class="keyword">class </span>MyController : <span class="keyword">public</span> <a class="code hl_class" href="classdrogon_1_1HttpController.html">HttpController</a>&lt;MyController&gt; {</div>
<div class="line">  <span class="keyword">public</span>:</div>
<div class="line">     <a class="code hl_define" href="HttpController_8h.html#ac2823538549b1c5f93df6052ae2bf149">METHOD_LIST_BEGIN</a></div>
<div class="line">     <a class="code hl_define" href="HttpController_8h.html#a7897c8d5068082f461ec471a41ccbd2e">ADD_METHOD_TO</a>(MyController::endpoint, <span class="stringliteral">&quot;/some/path&quot;</span>, Get);</div>
<div class="line">     <a class="code hl_define" href="HttpController_8h.html#ae77b30558f28a7b0868e30fd1cb03861">METHOD_LIST_END</a></div>
<div class="line"> </div>
<div class="line">     <span class="keywordtype">void</span> login(<span class="keyword">const</span> <a class="code hl_typedef" href="namespacedrogon.html#a5200699555f98a809538342baa167aad">HttpRequestPtr</a> &amp;req,</div>
<div class="line">                std::function&lt;<span class="keywordtype">void</span> (<span class="keyword">const</span> <a class="code hl_typedef" href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">HttpResponsePtr</a> &amp;)&gt; &amp;&amp;callback) {</div>
<div class="line">         assert(storage_-&gt;threadLocal == 42);</div>
<div class="line"> </div>
<div class="line">         <span class="comment">// handle the request</span></div>
<div class="line">     }</div>
<div class="line"> </div>
<div class="line">   <span class="keyword">private</span>:</div>
<div class="line">     IOThreadStorage&lt;MyThreadData&gt; storage_;</div>
<div class="line">};</div>
<div class="ttc" id="aHttpController_8h_html_a7897c8d5068082f461ec471a41ccbd2e"><div class="ttname"><a href="HttpController_8h.html#a7897c8d5068082f461ec471a41ccbd2e">ADD_METHOD_TO</a></div><div class="ttdeci">#define ADD_METHOD_TO(method, path_pattern,...)</div><div class="ttdef"><b>Definition</b> HttpController.h:33</div></div>
<div class="ttc" id="aHttpController_8h_html_ac2823538549b1c5f93df6052ae2bf149"><div class="ttname"><a href="HttpController_8h.html#ac2823538549b1c5f93df6052ae2bf149">METHOD_LIST_BEGIN</a></div><div class="ttdeci">#define METHOD_LIST_BEGIN</div><div class="ttdef"><b>Definition</b> HttpController.h:28</div></div>
<div class="ttc" id="aHttpController_8h_html_ae77b30558f28a7b0868e30fd1cb03861"><div class="ttname"><a href="HttpController_8h.html#ae77b30558f28a7b0868e30fd1cb03861">METHOD_LIST_END</a></div><div class="ttdeci">#define METHOD_LIST_END</div><div class="ttdef"><b>Definition</b> HttpController.h:37</div></div>
<div class="ttc" id="aclassdrogon_1_1HttpController_html"><div class="ttname"><a href="classdrogon_1_1HttpController.html">drogon::HttpController</a></div><div class="ttdoc">The reflection base class template for HTTP controllers</div><div class="ttdef"><b>Definition</b> HttpController.h:60</div></div>
<div class="ttc" id="anamespacedrogon_html_a5200699555f98a809538342baa167aad"><div class="ttname"><a href="namespacedrogon.html#a5200699555f98a809538342baa167aad">drogon::HttpRequestPtr</a></div><div class="ttdeci">std::shared_ptr&lt; HttpRequest &gt; HttpRequestPtr</div><div class="ttdef"><b>Definition</b> drogon_callbacks.h:26</div></div>
<div class="ttc" id="anamespacedrogon_html_ab2a2d829bb017f43c2c9de72f4042baa"><div class="ttname"><a href="namespacedrogon.html#ab2a2d829bb017f43c2c9de72f4042baa">drogon::HttpResponsePtr</a></div><div class="ttdeci">std::shared_ptr&lt; HttpResponse &gt; HttpResponsePtr</div><div class="ttdef"><b>Definition</b> drogon_callbacks.h:24</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">成员类型定义说明</h2>
<a id="a7d9827ce9a95c8eedcb06ce760541d48" name="a7d9827ce9a95c8eedcb06ce760541d48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d9827ce9a95c8eedcb06ce760541d48">&#9670;&#160;</a></span>InitCallback</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::InitCallback =  std::function&lt;void(<a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;, size_t)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a99ea4e2087640afb5489cffb283486a2" name="a99ea4e2087640afb5489cffb283486a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99ea4e2087640afb5489cffb283486a2">&#9670;&#160;</a></span>ValueType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::ValueType =  C</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="a744b426884cbb4c04c12f52aa48f3bbc" name="a744b426884cbb4c04c12f52aa48f3bbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744b426884cbb4c04c12f52aa48f3bbc">&#9670;&#160;</a></span>IOThreadStorage()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<div class="memtemplate">
template&lt;typename... Args&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::IOThreadStorage </td>
          <td>(</td>
          <td class="paramtype">Args &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a65cc6d82047caf8e3e5b9aed0f79ca16" name="a65cc6d82047caf8e3e5b9aed0f79ca16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65cc6d82047caf8e3e5b9aed0f79ca16">&#9670;&#160;</a></span>getThreadData() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp; <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::getThreadData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the thread storage associate with the current thread </p>
<p>This function may only be called in a request handler </p>

</div>
</div>
<a id="a387588390a81f201731f3d989e8378d4" name="a387588390a81f201731f3d989e8378d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a387588390a81f201731f3d989e8378d4">&#9670;&#160;</a></span>getThreadData() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp; <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::getThreadData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aacd3dcefacbd09c3309d42f2f166e579" name="aacd3dcefacbd09c3309d42f2f166e579"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacd3dcefacbd09c3309d42f2f166e579">&#9670;&#160;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::init </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a7d9827ce9a95c8eedcb06ce760541d48">InitCallback</a> &amp;&#160;</td>
          <td class="paramname"><em>initCB</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a8bd1c4f7eeadb199d4a1e6c1d164b6cd" name="a8bd1c4f7eeadb199d4a1e6c1d164b6cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bd1c4f7eeadb199d4a1e6c1d164b6cd">&#9670;&#160;</a></span>operator*() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp; <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a18a10e8496d63e13dedfd41044c5f921" name="a18a10e8496d63e13dedfd41044c5f921"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18a10e8496d63e13dedfd41044c5f921">&#9670;&#160;</a></span>operator*() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp; <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a2b65b8081973a7b15d824abcf0df8591" name="a2b65b8081973a7b15d824abcf0df8591"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b65b8081973a7b15d824abcf0df8591">&#9670;&#160;</a></span>operator-&gt;() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> * <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a04a8083b0833c03fb2f5522736876325" name="a04a8083b0833c03fb2f5522736876325"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04a8083b0833c03fb2f5522736876325">&#9670;&#160;</a></span>operator-&gt;() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> * <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::operator-&gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a31516d59aed4d5352a01877c2bd82361" name="a31516d59aed4d5352a01877c2bd82361"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31516d59aed4d5352a01877c2bd82361">&#9670;&#160;</a></span>setThreadData() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::setThreadData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&#160;</td>
          <td class="paramname"><em>newData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the thread data for the current thread </p>
<p>This function may only be called in a request handler </p>

</div>
</div>
<a id="afcf2d6a7d36c8d985ba57adc318f52a2" name="afcf2d6a7d36c8d985ba57adc318f52a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcf2d6a7d36c8d985ba57adc318f52a2">&#9670;&#160;</a></span>setThreadData() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename C &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classdrogon_1_1IOThreadStorage.html">drogon::IOThreadStorage</a>&lt; C &gt;::setThreadData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdrogon_1_1IOThreadStorage.html#a99ea4e2087640afb5489cffb283486a2">ValueType</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>newData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="IOThreadStorage_8h_source.html">IOThreadStorage.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
